.TH std::ranges::iota_view::sentinel 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::ranges::iota_view::sentinel \- std::ranges::iota_view::sentinel

.SH Synopsis
   struct /*sentinel*/;  \fI(since C++20)\fP
                         (exposition only*)

   The return type of iota_view::end, used when the iota_view is bounded (i.e. Bound is
   not std::unreachable_sentinel_t) and Bound and W are not the same type.

.SH Member functions

std::ranges::iota_view::sentinel::sentinel

   /*sentinel*/() = default;                       \fB(1)\fP \fI(since C++20)\fP
   constexpr explicit /*sentinel*/( Bound bound ); \fB(2)\fP \fI(since C++20)\fP

   1) Value-initializes bound_ via its default member initializer (= Bound()).
   2) Initializes bound_ with bound.

.SH Non-member functions

   In the following descriptions, value_ is an underlying data member of iterator from
   which its operator* copies.

operator==(std::ranges::iota_view::iterator, std::ranges::iota_view::sentinel)

   friend constexpr bool operator==( const /*iterator*/& x,    \fI(since C++20)\fP
                                     const /*sentinel*/& y );

   Equivalent to: return x.value_ == y.bound_;.

   The != operator is synthesized from operator==.

   This function is not visible to ordinary unqualified or qualified lookup, and can
   only be found by argument-dependent lookup when sentinel is an associated class of
   the arguments.

operator-(std::ranges::iota_view::iterator, std::ranges::iota_view::sentinel)

   friend constexpr std::iter_difference_t<W>

       operator-(const /*iterator*/& x, const /*sentinel*/& y) \fB(1)\fP \fI(since C++20)\fP

       requires std::sized_sentinel_for<Bound, W>;
   friend constexpr std::iter_difference_t<W>

       operator-(const /*sentinel*/& x, const /*iterator*/& y) \fB(2)\fP \fI(since C++20)\fP

       requires std::sized_sentinel_for<Bound, W>;

   1) Equivalent to return x.value_ - y.bound_;.
   2) Equivalent to return -(y.value_ - x.bound_);.

   These functions are not visible to ordinary unqualified or qualified lookup, and can
   only be found by argument-dependent lookup when sentinel is an associated class of
   the arguments.
